

function checkForm(){
	
	var file = getElementById("portraitfile");
	
	if(file.value!=""){
		return true;
	}
	else{
		alert("请选择要上传的图片");
	}
	
}




/**
	更改头像
*/

function getPortrait(){
	$.ajax({
		url : base_domain + '/user/getPortrait.html',
		type : 'post',
		dataType : 'json',
		contentType : "application/x-www-form-urlencoded;charset=utf-8",
		success : function(result) {
				var portraitImg = document.getElementById("portraitImg");
				if (result != "" && result!=null) {
					portraitImg.src="../"+result;
				} else {
					portraitImg.src="../images/default.png";
				}		
		},

		error : function() {
			alert("连接服务器出错");
		}
	});
}

//function submit_(){
//	var updatePortraitForm = getElementById("updatePortraitForm");
//	updatePortraitForm.submit();
//	history.go(0);
//}

